package com.problem.leetcode;

public class Problem287 {
    public static void main(String[] args) {
        System.out.println( 2 ^1);
    }

    public int findDuplicate(int[] nums) {
        int result = 0;

        for (int index = 0; index < nums.length; ++index) {
            result = result ^ nums[index] ^ 1;
        }
        return result;

    }

}
